A 500 Internal Server Error in this context almost always means Traefik is trying to "talk" to Authelia to verify your session, but the connection is failing at the network level.
Since you've fixed the labels, Traefik is now correctly trying to use the middleware, but it can't reach the address specified in your dynamic_conf.yml.

The Most Likely Cause: The Internal URL

In your dynamic_conf.yml, you likely have a line like this:
address: http://authelia:9091/api/verify?rd=https://auth.britbuzz.uk/
Check these two things immediately:

  1. Container Name Match: Does the name in that URL (authelia) match the container_name in your Authelia Docker Compose? If you named the container authelia_v4, the URL must be http://authelia_v4:9091....
  2. Shared Network: Both the Traefik container and the Authelia container must be on the same Docker network (in your case, proxy). If Authelia is on a different network, Traefik will get a "Connection Refused" or "Host Unreachable," resulting in that 500 error.

---

How to Verify the Connection

You can test if Traefik can "see" Authelia by running a curl command from inside the Traefik container:

Bash

docker exec -it traefik sh -c "wget -qO- http://authelia:9091/api/verify"

  • If it returns nothing or a 401/Unauthorized: The network is fine. The 500 error is likely coming from an Authelia configuration error (check docker logs authelia).
  • If it says "bad address" or "timed out": Traefik cannot find the Authelia container. Check that they are on the same network.

---

Other Common 500 Error Triggers

  • Authelia is Crashing: If Authelia has a syntax error in its configuration.yml, the container might be stuck in a "Restarting" loop. Check docker ps to see if it's "Up."

  • Missing ForwardAuth Headers: Ensure your dynamic_conf.yml middleware looks exactly like this, specifically the trustForwardHeader part:
    YAML
    auth-authelia:
    forwardAuth:
    address: http://authelia:9091/api/verify?rd=https://auth.britbuzz.uk/
    trustForwardHeader: true # Crucial for Traefik v3

  • Trailing Slash: Ensure your rd parameter in the URL ends with a / if your domain requires it.

Check the Logs

To find the exact "smoking gun," look at the Traefik logs. They will tell you why the middleware failed:

Bash

docker logs traefik | grep "auth-authelia"

You are looking for a message like: failed to call auth service: ...
Would you like me to look at your Authelia docker-compose and the dynamic_conf.yml side-by-side to check the network and naming?